package com.base.server.search.pojo;

import java.util.HashMap;
import java.util.Map;

/**
 * 模型
 * @author yuejing
 * @date 2019年7月31日 上午9:47:50
 */
public class SearchModel {
	/**
	 * 编码
	 */
	private String id;

	/**
	 * 文章标题
	 */
	private String title;

	/**
	 * 文章内容
	 */
	private String content;

	/**
	 * 构造方法
	 * @param id
	 * @param title
	 * @param content
	 */
	public SearchModel(String id, String title, String content) {
		this.id = id;
		this.title = title;
		this.content = content;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Override
	public String toString() {
		return "LuceneModel [id=" + id + ", title=" + title + ", content="
				+ content + "]";
	}
	
	public Map<String, Object> getMap() {
		Map<String, Object> data = new HashMap<String, Object>();
		data.put("id", id);
		data.put("title", title);
		data.put("content", content);
		return data;
	}
}
